define(["jquery"],function($){
	var tpl = {};

	tpl.history = function(){
		var html = "";
		html += history();
		return html;
	};
	tpl.info = function(){
		var html = "";
		html += info();
		return html;
	};
	tpl.printInfo = function(){
		var html = "";
		html += printInfo();
		return html;
	};

	var history = function(){
        return 	'<script type="text/html" id="tpl_gmsDetail_history">'+
        		'	<ul>'+
	            ' 		{{each list as value i}}'+
	            '			<li {{if i==0}}class="active"{{/if}} data-answerId="{{value.answerId}}">{{value.testTime}}</li>'+
	            '		{{/each}}'+
	            '	</ul>'+
	            '</script>'
    };
    var info = function(){
        return 	'<script type="text/html" id="tpl_gmsDetail_info">'+
				'	<div class="gmsDetail-item">'+
				'		<div class="gmsDetail-tit"><i class="fa fa-caret-right" aria-hidden="true"></i>基本信息</div>'+
				'		<div class="row">'+
				'			<div class="col-sm-6 col-md-4">姓名：{{userName}}</div>'+
				'			<div class="col-sm-6 col-md-4">性别：{{gender}}</div>'+
				'			<div class="col-sm-6 col-md-4">出生日期：{{birthday}}</div>'+
				'			<div class="col-sm-6 col-md-4">孕周：{{pregnancyWeek}}</div>'+
				'			<div class="col-sm-6 col-md-4">周龄：{{weekAge}}</div>'+
				'		</div>'+
                '    </div>'+
                '    <div class="gmsDetail-item">'+
				'		<div class="gmsDetail-tit"><i class="fa fa-caret-right" aria-hidden="true"></i>本次结果</div>'+
				'		<div class="row">'+
				'			<div class="col-sm-6 col-md-6">出生胎龄：{{result.embryonicAge}}</div>'+
				'			<div class="col-sm-6 col-md-6">记录体位：{{result.posture}}</div>'+
				'			<div class="col-sm-6 col-md-6">运动表现：{{result.stage}}</div>'+
				'			<div class="col-sm-6 col-md-6">评估日期：{{result.testTime}}</div>'+
				'		</div>'+
                '    </div>'+
                '    <div class="gmsDetail-item">'+
				'		<div class="gmsDetail-tit"><i class="fa fa-caret-right" aria-hidden="true"></i>GMs全身运动评估</div>'+
				'		<div class="chart-wrap"><div class="chart" id="chart"></div></div>'+
                '    </div>'+
                '	 <div class="gmsDetail-item2">'+
                '        <div class="title">指导建议'+
                '            <span class="pull-right" id="modifyGuides" type="modify"><i class="fa fa-pencil-square" aria-hidden="true"></i>修改建议</span>'+
                '        </div>'+
                '        <div class="guides" id="guides">{{if result.guides}}{{result.guides}}{{else}}暂无指导意见{{/if}}</div>'+
                '    </div>'+
                '    <div class="gmsDetail-item2">'+
                '        <div class="title">备注'+
                '            <span class="pull-right" id="modifyRemark" type ="modify"><i class="fa fa-pencil-square" aria-hidden="true"></i>修改备注</span>'+
                '        </div>'+
                '        <div class="guides" id="remark">{{if result.remark}}{{result.remark}}{{else}}暂无备注{{/if}}</div>'+
                '    </div>'+
	            '</script>'
    };
	var printInfo = function(){
		return 	'<script id="tpl_gmsDetail_printInfo" type="html/text">'+
				'	<li>姓名：{{userName}}</li>'+
				'	<li>性别: {{gender}}</li>'+
				'	{{if hisNo}}<li>门诊卡号：{{hisNo}}</li>{{/if}}'+
				'	<li>出生日期：{{birthday}}</li>'+
				'	<li>孕周：{{pregnancyWeek}}</li>'+
				'	<li>出生胎龄：{{result.embryonicAge}}</li>'+
				'	<li>记录体位：{{result.posture}}</li>'+
				'	<li>评估日期：{{testTime}}</li>'+
				'</script>';
	};
	
	return tpl;
});